import React from 'react';
import { Router, Route, Switch } from 'react-router-dom';
import AuthRoute from './utils/AuthRoute';
import Login from './pages/Login';
import Layout from './pages/Layout';
import history from './utils/history';

export default class App extends React.Component {
  render() {
    return (
      <Router history={history}>
        <Switch>
          <Route path={'/login'} component={Login}></Route>
          {/* <Route path={'/'} component={Layout}></Route> */}
          <AuthRoute path={'/'} component={Layout}></AuthRoute>
        </Switch>
      </Router>
    );
  }
}
